package com.jrx.anytxn.accounting.mapper.ext;

import com.jrx.anytxn.accounting.entity.GaVoucherExcpReport;
import com.jrx.anytxn.accounting.mapper.base.GaVoucherExcpReportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 传票例外报表自定义mapper接口
 *
 * @author Qingyao Xing
 * @date 2019/9/6 10:23
 */
public interface ExtVoucherExcpReportMapper extends GaVoucherExcpReportMapper {

    /**
     * 根据主键查询对象
     *
     * @param id 主键
     * @return com.jrx.anytxn.accounting.entity.voucherexcpreport
     * @author Qingyao Xing
     * @date 2019/9/6 10:20
     */
    GaVoucherExcpReport selectModalByIdAndTenIdAndCusId(@Param("id") Long id, @Param("tenantId") String tenantId, @Param("customerId") String customerId);

    /**
     * 分页查询所有
     *
     * @param
     * @return java.util.List<com.jrx.anytxn.accounting.entity.voucherexcpreport>
     * @author Qingyao Xing
     * @date 2019/9/6 10:20
     */
    List<GaVoucherExcpReport> selectAllByPageAndTenId(@Param("tenantId") String tenantId,@Param("startDate")  String startDate,@Param("endDate")  String endDate, @Param("loanId")  String loanId,@Param("customerId") String customerId,@Param("channel") String channel);

    /**
     * 查询当前条件是否有数据
     *
     * @param businessDate 业务日期
     * @param flowno       流水号
     * @return int 数据数量
     * @author Qingyao Xing
     * @date 2019/9/10 9:58
     */
    Integer selectVoucherExcpReportCountByFlowno(@Param("businessDate") Date businessDate, @Param("flowno") String flowno);


    int deleteByDate(@Param("businessDate") Date businessDate);

    int batchInsert(List<GaVoucherExcpReport> interestVoucherExcpReportList);
}
